package com.konsung.ksdc.bean.netbean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 购物车信息bean
 * Created by Administrator on 2016/5/25 0025.
 */
public class CartDetailNetBean implements Parcelable {
    private String catId; //购物车id

    private String productId; //商品id

    private String productName; //商品名字

    private String subTitle; //商品副标题

    private String marketPrice; //商品市场价

    private String memberPrice; //商品会员价

    private String shopNumber; //商品数量

    private String iconImageUrl; //商品图标存储地址

    /**
     * 构造方法
     * @param catId 购物车id
     * @param productId 商品id
     * @param productName 商品名称
     * @param subTitle 商品副标题
     * @param marketPrice 商品原价
     * @param memberPrice 折后价
     * @param shopNumber 商品数量
     * @param iconImageUrl 商品图片url
     */
    public CartDetailNetBean(String catId, String productId, String
            productName, String subTitle, String marketPrice, String
            memberPrice, String shopNumber, String iconImageUrl) {
        this.catId = catId;
        this.productId = productId;
        this.productName = productName;
        this.subTitle = subTitle;
        this.marketPrice = marketPrice;
        this.memberPrice = memberPrice;
        this.shopNumber = shopNumber;
        this.iconImageUrl = iconImageUrl;
    }

    /**
     * 获取购物车id
     * @return 购物车id
     */
    public String getCatId() {
        return catId;
    }

    /**
     * 设置购物车id
     * @param catId 购物车id
     */
    public void setCatId(String catId) {
        this.catId = catId;
    }

    /**
     * 获取商品id
     * @return 商品id
     */
    public String getProductId() {
        return productId;
    }

    /**
     * 设置商品id
     * @param productId 商品id
     */
    public void setProductId(String productId) {
        this.productId = productId;
    }

    /**
     * 获取商品名称
     * @return 商品名称
     */
    public String getProductName() {
        return productName;
    }

    /**
     * 设置商品名称
     * @param productName 商品名称
     */
    public void setProductName(String productName) {
        this.productName = productName;
    }

    /**
     * 获取商品副标题
     * @return 商品副标题
     */
    public String getSubTitle() {
        return subTitle;
    }

    /**
     * 设置商品副标题
     * @param subTitle 商品副标题
     */
    public void setSubTitle(String subTitle) {
        this.subTitle = subTitle;
    }

    /**
     * 获取商品原价
     * @return 商品原价
     */
    public String getMarketPrice() {
        return marketPrice;
    }

    /**
     * 设置商品原价
     * @param marketPrice 商品原价
     */
    public void setMarketPrice(String marketPrice) {
        this.marketPrice = marketPrice;
    }

    /**
     * 获取商品折后价
     * @return 商品折后价
     */
    public String getMemberPrice() {
        return memberPrice;
    }

    /**
     * 设置商品折后价
     * @param memberPrice 商品折后价
     */
    public void setMemberPrice(String memberPrice) {
        this.memberPrice = memberPrice;
    }

    /**
     * 获取商品购买数量
     * @return 商品购买数量
     */
    public String getShopNumber() {
        return shopNumber;
    }

    /**
     * 设置商品购买数量
     * @param shopNumber 商品购买数量
     */
    public void setShopNumber(String shopNumber) {
        this.shopNumber = shopNumber;
    }

    /**
     * 获取商品图片url
     * @return 图片url
     */
    public String getIconImageUrl() {
        return iconImageUrl;
    }

    /**
     * 设置商品图片url
     * @param iconImageUrl 商品图片url
     */
    public void setIconImageUrl(String iconImageUrl) {
        this.iconImageUrl = iconImageUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.catId);
        dest.writeString(this.productId);
        dest.writeString(this.productName);
        dest.writeString(this.subTitle);
        dest.writeString(this.marketPrice);
        dest.writeString(this.memberPrice);
        dest.writeString(this.shopNumber);
        dest.writeString(this.iconImageUrl);
    }

    /**
     * 序列化实体类对象
     * @param in Parcel对象
     */
    protected CartDetailNetBean(Parcel in) {
        this.catId = in.readString();
        this.productId = in.readString();
        this.productName = in.readString();
        this.subTitle = in.readString();
        this.marketPrice = in.readString();
        this.memberPrice = in.readString();
        this.shopNumber = in.readString();
        this.iconImageUrl = in.readString();
    }

    public static final Creator<CartDetailNetBean> CREATOR = new
            Creator<CartDetailNetBean>() {
                @Override
                public CartDetailNetBean createFromParcel(Parcel source) {
                    return new CartDetailNetBean(source);
                }

                @Override
                public CartDetailNetBean[] newArray(int size) {
                    return new CartDetailNetBean[size];
                }
            };

    @Override
    public String toString() {
        return "CartDetailNetBean{" +
                "catId='" + catId + '\'' +
                ", productId='" + productId + '\'' +
                ", productName='" + productName + '\'' +
                ", subTitle='" + subTitle + '\'' +
                ", marketPrice='" + marketPrice + '\'' +
                ", memberPrice='" + memberPrice + '\'' +
                ", shopNumber='" + shopNumber + '\'' +
                ", iconImageUrl='" + iconImageUrl + '\'' +
                '}';
    }
}
